/* ----------------------------------------------------------------------
*
* Copyright (C) 2024 XiaoFei. All rights reserved.
*
* $file:		XiaoZhi_Key.h
* $Date:        29-March-2024
* $Revision: 	V1
* $Project: 	XiaoFei BSP Library
* $Taobao:      https://item.taobao.com/item.htm?abbucket=17&id=558374381395
*
* -------------------------------------------------------------------- */

#ifndef __XiaoZhi_Key_H
#define __XiaoZhi_Key_H

#define Key_RCC(x)   	                RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA,(FunctionalState)x)
#define Key_GPIO		                GPIOA
#define Key_Pin			                GPIO_Pin_0
#define Key_Rd					        GPIO_ReadInputDataBit(Key_GPIO, Key_Pin)
#define Key_EN			                Bit_RESET

/* 
* @function: 	GPIO_Key_Init
*/
void GPIO_Key_Init(void);

/* 
* @function: 	Key_Get
* @return:		Return 0x01 when the key is set.
*/
unsigned char Key_Get(void);
			
#endif

